<?php

namespace App\Models\ChinaBank;

use Illuminate\Database\Eloquent\Model;

class AdminModel extends Model
{
    protected $table = "bank_admin";
    protected $primaryKey = "admin_id";
    protected $guarded = [];

    public static function login($name,$pwd){
        $pwd = self::password($pwd);
        return self::where("name",$name)->where("pwd",$pwd)->first();
    }


    public static function password($pwd){

        return sha1("tongzhu".$pwd);
    }
}
